/******************************************************************************/
/*! 
    Filename
    [Copyright]

    \file
    \namespace    
    \brief      
*/
/******************************************************************************/
/*** Include guard ************************************************************/
#ifndef CAMERA_H
#define CAMERA_H

/*** Includes *****************************************************************/
#include "NEntity.h"
#include "NeroCore\NMath.h"

/*** Forward Declarations *****************************************************/

/*** Namespace ****************************************************************/
namespace Engine
{
/*** Macros *******************************************************************/

/*** Constants ****************************************************************/

/*** Interface ****************************************************************/
class NCamera : public NEntity
{
	RTTI_DECLARATIONS(NCamera, NEntity)

public:
	NCamera();

	~NCamera();

	virtual void Initialize();

	virtual void Deinitialize();

	virtual void Update(float gameTime);

	void SetPosition(NVector3 value);
	void SetRotation(NVector3 value);
	void SetOrientation(NVector3 value);
	void SetDirection(NVector3 value);
	void SetLookAt(NVector3 value);
	void SetRight(NVector3 value);

	void SetAspectRatio(float value);
	void SetNearPlaneDistance(float value);
	void SetFarPlanceDistance(float value);
	void SetFOVDistance(float value);

	void SetViewMatrix(NMatrix4 value);

	NVector3 GetPosition();
	NVector3 GetOrientation();
	NVector3 GetDirection();
	NVector3 GetLookAt();
	NVector3 GetRight();

	float GetAspectRatio();
	float GetNearPlaneDistance();
	float GetFarPlaneDistance();
	float GetFOVDistance();

	NMatrix4 GetViewMatrix();
	
	bool IsPositionLocked();

	void LockPosition();
	void UnlockPosition();
	
protected:
	NVector3 mPosition;
	NVector3 mRotation;
	NVector3 mOrientation;
	NVector3 mDirection;
	NVector3 mLookAt;
	NVector3 mRight;

	float mAspectRatio;
	float mFarPlaneDistance;
	float mNearPlaneDistance;
	float mFOVDistance;

	NMatrix4 mViewMatrix;

	bool mIsPositionLocked;
};
}

#endif //CAMERA_H
